var column_info = {
    language: 'zh_CH',
    facade: '/facade/Column.aspx',
    listTitle: '企业列表',
    editTitle: '企业信息维护',
    metas: [
		'id',
		{ name: 'projectName', type: 'string', fieldLabel: '项目名称', ex_list: { width: 80 }, ex_edit: { allowBlank: true, width: 200} },
		{ name: 'tableName', type: 'string', fieldLabel: '表格名称', ex_list: { width: 80 }, ex_edit: { allowBlank: true, width: 200} },
		{ name: 'columnName', type: 'string', fieldLabel: '列名称', ex_list: { width: 80 }, ex_edit: { allowBlank: true, width: 200} },
		{ name: 'columnType', type: 'string', fieldLabel: '列类型', ex_list: { width: 80}, ex_edit: { allowBlank: true, width: 200} },
		{ name: 'Lenth', type: 'string', fieldLabel: '长度', ex_list: { width: 80 }, ex_edit: { allowBlank: true, width: 200} },
		{ name: 'columnMemo', type: 'string', fieldLabel: '说明', ex_list: { width: 80}, ex_edit: { allowBlank: true, width: 200} }
	],
    getQueryConfig: function() {
        var projectNameCfg = { id: 'q_projectName', xtype: 'textfield', width: 100, value: '' };
        var tableNameCfg = { id: 'q_tableName', xtype: 'textfield', width: 100, value: '' };
        return ['项目名称:', projectNameCfg, '表格名称:', tableNameCfg];
    },
    newRecord: function() {
        var meta_rec = Ext.data.Record.create(this.metas);
        return new meta_rec({ projectName: 'ZP', tableName: 'School', columnName: '', columnType: 'string', Lenth: 'nvarchar(45)', columnMemo: '' });
    },
    //从左往右布局，如果有跨列，则新增一个group
    group1: { title: '基本信息', colnums: 1, colnumSpace: 115, fields: ['projectName', 'tableName', 'columnName', 'columnType', 'Lenth', 'columnMemo'] }
};

Star.registerMeta('column', column_info.metas);
//从上到下布局
var column_editor = [
	{
	    items: [
			[
				{ name: 'projectName' },
				{ name: 'tableName' },
				{ name: 'columnName' },
				{ name: 'columnType' },
				{ name: 'Lenth' },
				{ name: 'columnMemo' }
			]
		]
	}
];
function checkSelects(length) {
    if (length == 0) {
        Ext.MessageBox.alert("错误！", "请选中一行记录");
        return false;
    }
    else if (length > 0) {
        return true;
    }
    else {
        Ext.MessageBox.alert("错误！", "出现未知错误！请刷新后重试");
        return false;
    }
}